package fss.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class FssUtils {
    private static final String DATE_FORMAT = "MM-dd-yyyy hh.mm.ss.SS";
    /**
     * Format the date to the standardized format (MM-dd-yyyy hh.mm.ss.SS).
     * @param date the date.
     * @return the formatted date string.
     */
    public static String formatDate(Date date) {
        return formatDate(date, DATE_FORMAT);
    }
    /**
     * Format the date as the specified format.
     * @param date the date.
     * @param format the format.
     * @return the formatted date string.
     */
    public static String formatDate(Date date, String format) {
        String sDate = null;
        SimpleDateFormat formatter = new SimpleDateFormat(format);
        sDate = formatter.format(date);
        return sDate;
    }
}
